package com.bdqn.bookshop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.bdqn.bookshop.utils.ClassifyParentAndChild;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author : 罗若然[LUO_RUO_RAN]
 * @date : 2020-07-24 10:26
 * 书籍
 **/
public class Books {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;//编号
    private String bookName;//书本名
    private String classifyId;//分类编号
    private Integer price;//价格
    private Integer isdiscount;//是否打折（1:不打折 ，2:打折）
    private Integer discount;//打折价
    private String bookDescribe;//描述
    private String imageUrl;//封面图
    private Integer state;//状态（1:已发布，2:交易中，3:交易完成，4:已下架）
    private Integer publisher;//发布人（用户编号）
    private Integer purchaser;//购买人（用户编号）
    private Date createTime;//创建时间
    private Date changeTime;//修改时间


    @TableField(exist = false)
    private String publisherName;//发布人昵称
    @TableField(exist = false)
    private String purchaserName;//购买人昵称
    @TableField(exist = false)
    private List<ClassifyParentAndChild> pac = new ArrayList<>();//分类的父级与子级显示名集合

    public String getPublisherName() {
        return publisherName;
    }

    public void setPublisherName(String publisherName) {
        this.publisherName = publisherName;
    }

    public String getPurchaserName() {
        return purchaserName;
    }

    public void setPurchaserName(String purchaserName) {
        this.purchaserName = purchaserName;
    }

    public List<ClassifyParentAndChild> getPac() {
        return pac;
    }

    public void setPac(List<ClassifyParentAndChild> pac) {
        this.pac = pac;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public String getClassifyId() {
        return classifyId;
    }

    public void setClassifyId(String classifyId) {
        this.classifyId = classifyId;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getIsdiscount() {
        return isdiscount;
    }

    public void setIsdiscount(Integer isdiscount) {
        this.isdiscount = isdiscount;
    }

    public Integer getDiscount() {
        return discount;
    }

    public void setDiscount(Integer discount) {
        this.discount = discount;
    }

    public String getBookDescribe() {
        return bookDescribe;
    }

    public void setBookDescribe(String bookDescribe) {
        this.bookDescribe = bookDescribe;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getPublisher() {
        return publisher;
    }

    public void setPublisher(Integer publisher) {
        this.publisher = publisher;
    }

    public Integer getPurchaser() {
        return purchaser;
    }

    public void setPurchaser(Integer purchaser) {
        this.purchaser = purchaser;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getChangeTime() {
        return changeTime;
    }

    public void setChangeTime(Date changeTime) {
        this.changeTime = changeTime;
    }
}
